import Vue from 'vue'
import Index from '../views/index/Index'
import Home from '../views/home/Home'
import addproject from '../views/home/addproject'
import Technician from '../views/technician/Technician'
import Order from '../views/order/Order'
import Member from '../views/member/Member'
import Appointment from '../views/appointment/Appointment' 
import Details from '../views/order/Details' 
import Pay from '../views/order/Pay'
import Jiesuan from '../views/order/Jiesuan'
const Room =()=> import ('../views/home/Room')
 

import TechnicianOnline from '../views/technician/TechnicianOnline.vue'
import TechnicianAll from '../views/technician/TechnicianAll.vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)


const routes = [{
    path: '/',
    redirect: "/index/home"
  },
  {
    path: '/index',
    component: Index,
    children: [{
        path: 'home',
        component: Home,
       
      },
      // 开台
      {
        path: 'addproject',
        component: addproject
      },
      //技师
      {
        path: 'technician',
        component: Technician,
        children: [{
            path: 'technicianOnline',
            component: TechnicianOnline
          },
          {
            path: 'technicianAll',
            component: TechnicianAll
          },
        ]
      },
      //订单
      {
        path: 'order',
        component: Order,
      },
      //会员
      {
        path: 'member',
        component: Member
      },
      //预约
      {
        path: 'appointment',
        component: Appointment
      },
      // 详情页
      {
        path:'details',
        component:Details          
      },
      // 结算
      {
        path:'Pay',
        component:Pay
      },
      //付钱
      {
        path:'jiesuan',
        component:Jiesuan
      },
      //房间添加项目
      {
        path:'room',
        component:Room

      }
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router